﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WfhTrader.Core.Trading
{
    /// <summary>
    /// 交易接口
    /// </summary>
    public interface ITrade
    {
        /// <summary>
        /// 开仓
        /// </summary>
        /// <param name="position">持仓类</param>
        /// <param name="detail">持仓明细类</param>
        void Open(Position position, PositionDetail detail);

        /// <summary>
        /// 平仓
        /// </summary>
        /// <param name="position">持仓类</param>
        /// <param name="price">平仓价格</param>
        /// <param name="volume">平仓数量</param>
        void Close(Position position, double price, int volume);
    }
}
